package org.zerta.troops.common;
import java.util.List;
import java.util.LinkedList;

public class Player {

	private String name;
	
	private List <Area> areasWithPresence;
	
	public Player () {
		areasWithPresence = new LinkedList<Area>();
	}
	
	public void setName( String name ) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	public List <Area> getAreasWithPresence() {
		return areasWithPresence;
	}
	
	public void addAreaWithPresence( Area area ) {
		if (!areasWithPresence.contains(area)) {
			areasWithPresence.add(area);
		}
	}
	
	public void removeAreaWithPresence( Area area ) {
		if (areasWithPresence.contains(area)) {
			areasWithPresence.remove(area);
		}
	}
	
	public void clearAreasWithPresence() {
		areasWithPresence.clear();
	}
}
